<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="common">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table id="table"></table>
</body>
<script>
    $(function(){
        initUserTable2();
    })
    //初始化用户表格
    function initUserTable2(){
        $("#table").bootstrapTable({
            url:"../tree/findOrder",
            method : 'GET', //请求方式（*）
            toolbar:"#toolbar",
            columns:[
                {title:"订单号",field:"orderId",width:100
                },
                {title:"票张数",field:"shopCount",width:100
                },
                {title:"订单金额",field:"realityShopTotal",width:100
                },
                {title:"订单图片",field:"shopEntity.goodsImg",width:100,
                    formatter:function(value,row,index){
                        return '<img  src='+value+' width="50" height="50"/> ';
                    }
                },
                {title:"交易状态",field:"orderCondition",width:100,
                    formatter:function (value){
                        if(value==0){
                            return "未支付";
                        }
                        else if(value==1){
                            return "已支付";
                        }
                        else if(value==2){
                            return "交易关闭";
                        }
                        else if(value==3){
                            return "交易完成";
                        }
                        else if(value==4){
                            return "退款中";
                        }
                    }
                },

                {title:"操作",field:"cz",width:100,

                },



            ],
        })
    }

</script>

</html>